GtkHeaderBar: fix flipping of window controls
authorMatthias Clasen <mclasen@redhat.com>
Sat, 14 Dec 2013 23:30:10 +0000 (18:30 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 14 Dec 2013 23:30:10 +0000 (18:30 -0500)
We were not keepign the separators at the inside.

gtk/gtkheaderbar.c

index 9964f12a7e58779aeae3f210be6d32acd8ad24f9..7905509748034e7b8f85600853072e1f4a7919b2 100644 (file)
@@ -462,18 +462,15 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
           gtk_widget_show (box);
           gtk_widget_set_parent (box, GTK_WIDGET (bar));
 
+          gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0);
+          if (i ==1)
+            gtk_box_reorder_child (GTK_BOX (box), separator, 0);
+
           if ((direction == GTK_TEXT_DIR_LTR && i == 0) ||
               (direction == GTK_TEXT_DIR_RTL && i == 1))
-            {
-              gtk_style_context_add_class (gtk_widget_get_style_context (box), "left");
-              gtk_box_pack_end (GTK_BOX (box), separator, FALSE, FALSE, 0);
-            }
+            gtk_style_context_add_class (gtk_widget_get_style_context (box), "left");
           else
-            {
-              gtk_style_context_add_class (gtk_widget_get_style_context (box), "right");
-              gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0);
-              gtk_box_reorder_child (GTK_BOX (box), separator, 0);
-            }
+            gtk_style_context_add_class (gtk_widget_get_style_context (box), "right");
 
           if (i == 0)
             priv->titlebar_start_box = box;